<?php /* Smarty version 2.6.26, created on 2014-12-16 19:24:45
         compiled from page/image.html */ ?>
<section id="main-content">
	<section class="wrapper site-min-height">
		<h3><i class="fa fa-angle-right"></i> <?php echo $this->_tpl_vars['title']; ?>
 <i class="fa fa-image"></i></h3>
		<hr>
		<div class="row">
			<form enctype="multipart/form-data" action="Image.php?action=Upload" method="POST">
				<div class="col-md-12">
					<div class="fuf-img-upload">
						<div class="col-md-9">
							<div class="bg-white fuf-shadow tbl-td bts-ats">
								<h4><i class="fa fa-image" style="font-size:50px;"></i></h4><hr/>
								<input type="file" class="filestyle" data-icon="false" name="filedata" id="filedata">
								<img class="img-prev" id="preview" src="#" alt="preview image" /><hr/>
							</div>
						</div>
						<div class="col-md-3">
							<h4>Judul Gambar</h4>
							<input type="text" class="fuf-input form-control" name="jdl_gambar" placeholder="Username" />
							<h4>Deskripsi Gambar</h4>
							<input type="text" class="fuf-input form-control" name="deskripsi" placeholder="Deskripsi Gambar" />
							<h4>Alt</h4>
							<input type="text" class="fuf-input form-control" name="alt" placeholder="Alt" />
							<button type="submit" class="btn btn-default" style="margin-top: 14px;"><i class="fa fa-plus-circle"></i> Upload</button>
						</div>
						<div class="sambungfloat"></div>
					</div>
				</div>
			</form>
			<div class="row mt">
				<?php $_from = $this->_tpl_vars['image']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['gal']):
?>
				<div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 desc">
					<div class="project-wrapper">
						<div class="project">
							<div class="photo-wrapper">
								<div class="photo">
									<a class="fancybox" href="<?php echo $this->_tpl_vars['gal']['url']; ?>
"><img class="img-responsive" src="<?php echo $this->_tpl_vars['gal']['url']; ?>
" alt="<?php echo $this->_tpl_vars['gal']['alt']; ?>
"></a>
								</div>
								<div class="overlay"></div>
							</div>
						</div>
					</div>
					<h5><?php echo $this->_tpl_vars['gal']['jdl_gambar']; ?>
</h5>
				</div><!-- col-lg-4 -->
				<?php endforeach; endif; unset($_from); ?>
			</section><! --/wrapper -->
			<!--main content end-->
		</section>
		<script type="text/javascript">
			<?php echo '
			tinymce.init({
				selector: "textarea",
				plugins: [
				"advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
				"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
				"table contextmenu directionality emoticons template textcolor paste fullpage textcolor jbimages"
				],

				toolbar1: "bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | link unlink pagebreak | jbimages | code",

				menubar: false,
				toolbar_items_size: \'small\',

				style_formats: [
				{title: \'Bold text\', inline: \'b\'},
				{title: \'Red text\', inline: \'span\', styles: {color: \'#ff0000\'}},
				{title: \'Red header\', block: \'h1\', styles: {color: \'#ff0000\'}},
				{title: \'Example 1\', inline: \'span\', classes: \'example1\'},
				{title: \'Example 2\', inline: \'span\', classes: \'example2\'},
				{title: \'Table styles\'},
				{title: \'Table row 1\', selector: \'tr\', classes: \'tablerow1\'}
				],

				templates: [
				{title: \'Test template 1\', content: \'Test 1\'},
				{title: \'Test template 2\', content: \'Test 2\'}
				],

				relative_urls: false
			});
function readURL(input) {

	if (input.files && input.files[0]) {
		var reader = new FileReader();

		reader.onload = function (e) {
			$(\'#preview\').attr(\'src\', e.target.result);
		}

		reader.readAsDataURL(input.files[0]);
	}
}

$("#filedata").change(function(){
	readURL(this);
});
'; ?>

</script>